package com.test;

/**
 * @Author: LiQingBo
 * @Date: 2021/6/20-06-20-15:25
 * @Description: com.test
 * @version: 1.0
 */
public class Cat implements Comparable<Cat> {
int weight,height;

    public Cat(int weight, int height) {
        this.weight = weight;
        this.height = height;
    }

    @Override
    public int compareTo(Cat c) {
        return Integer.compare(this.weight, c.weight);
    }

    @Override
    public String toString() {
        return "Cat{" +
                "weight=" + weight +
                ", height=" + height +
                '}';
    }
}
